{% extends 'base.html' %}

{% load markup %}

{% load pp_url %}
{% load topictags %}
{% load issuetags %}
{% load consensustags %}
{% load argumenttags %}
{% load solutiontags %}
{% load sourcetags %}
{% load tag_helpers %}
{% load commenttags %}

{% block title %}
{% if request.object %}{{ request.object.name|title }} {% endif %} Details
{% endblock %}

{% block browser_bar %}
					
{% endblock %}

{% block content %}

	<div class="stage">
		<div class="issuemask">


            
			 <div class="issuebound">


           {% pp_get_issue object=request.object %}

        {% pp_consensus_get object=pp_issue.issue.id user=request.user %}
                    
				    <div class="issue">


						    <div class="issueback2">
                                 
<div class="issheader">{{pp_issue.issue.name}}</div>


                            
<div class="userinfo">

<div class="info">                                                        

submitted by <a href="{% pp_url template='user_profile.html' dimension='i' object=pp_issue.issue.user%}">{{pp_issue.issue.user.username}}</a>  



{% pp_comment_count object=pp_issue.issue.id %}

{{pp_issue.issue.submit_date|date:"(d/m/Y h:sA)"}} | {{ pp_comment.count }} comment{{ pp_comment.count|pluralize}} | {{pp_consensus.consensus.interest|floatformat:0 }} interest 
</div></div>                       
   
<div class="buttons">
                            
<div class="iss_button">
        {% ifequal 0 pp_issue.issue.solutions %}
                <a href="{% pp_url template='submit_solution.html' object=pp_issue.issue %}" class="small button blue">Submit Solution</a>
                {% else %}
                <a href="{% pp_url template='solutions.html' object=pp_issue.issue dimension=request.dimension start=0 end=20 %}" class="small button blue">see {{ pp_issue.issue.solutions}} solution{{ pp_issue.issue.solutions|pluralize }}</a>
                {% endifequal %}

         {% ifequal pp_issue.issue.user request.user %}

        <a href="{% pp_url template='submit_issue.html' object=pp_issue.issue %}" class="small button blue">edit</a>
        {% endifequal %}

</div>

            {% include "_voting.html" %}             

</div>        
{% endpp_comment_count %}
	    
						    </div>
                               

                          <div class="description">
                        {% autoescape on %}
                        {{pp_issue.issue.text|markdown }}
                        {% endautoescape %}


                        </div>

            {% include "_sourcetags.html" %}

            {% include '_commentform.html' %}

            <div class="commentstructure">

            {% pp_comment_list_get user=request.user object=pp_issue.issue.id request=request %}

               {% comment %} {{ pp_comment.debug_comments }} {% endcomment %}
                {{ pp_comment.comments|safe }}

            {% endpp_comment_list_get%}

            {% endpp_consensus_get %}
            {% endpp_get_issue %}
            </div>

            </div>
            <div class="rightcol">

            {% include "_rightcol.html" %}

            	
	</div>			
</div>	</div>
    </div>
</body>
</html>


{% endblock content %}
